<?php
/**
 * @Name: ThrowException.php
 * @Author: yashuai<1762910894@qq.com>
 */

namespace App\Exceptions;

class ThrowException extends \Exception
{

    public $data = [];

    public function __construct($message = "", $code = 500)
    {
        parent::__construct($message, $code);
    }

    /**
     * @return \Illuminate\Http\JsonResponse
     */
    public function render()
    {
        return _fail($this->code, $this->message);
    }

}
